﻿Imports System.Xml

Public Class PathGeometry
	Public Sub New()
		Me.GeometryPathTypes = New List(Of GeometryPathType)
	End Sub

	Property GeometryPathTypes As List(Of GeometryPathType)

	Public Shared Function ReadXml(reader As XmlReader) As PathGeometry
		Dim pg As New PathGeometry()

		While reader.Read()
			If reader.Name = "GeometryPathType" Then
				pg.GeometryPathTypes.Add(GeometryPathType.ReadXml(reader))
			ElseIf reader.Name = "PathGeometry" And reader.NodeType = XmlNodeType.EndElement Then
				Exit While
			End If
		End While

		Return pg
	End Function
End Class
